package org.tech4j.edi.persistence.api.query;

import java.util.Date;

/**
 * @program: tech4j
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/10 15:52
 **/
public class RetryRecordScanQuery {
    /**
     * 最小id
     */
    private String minId;

    /**
     * 最大id
     */
    private String maxId;

    /**
     * 开始时间
     */
    private Date startTime;

    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 环境隔离
     */
    private String env;


    /**
     * 业务类型
     */
    private Integer bizType;

    /**
     * 状态
     */
    private Integer recordStatus;

    /**
     * 业务单号
     */
    private String bizNo;


    /**
     * 最大查询大小
     */
    private Integer maxQuerySize;

    public String getMinId() {
        return minId;
    }

    public String getMaxId() {
        return maxId;
    }

    public Date getStartTime() {
        return startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public String getEnv() {
        return env;
    }

    public Integer getBizType() {
        return bizType;
    }

    public Integer getRecordStatus() {
        return recordStatus;
    }

    public String getBizNo() {
        return bizNo;
    }

    public Integer getMaxQuerySize() {
        return maxQuerySize;
    }

    public static final class Builder {
        private String minId;
        private String maxId;
        private Date startTime;
        private Date endTime;
        private String env;
        private Integer bizType;
        private Integer recordStatus;
        private String bizNo;
        private Integer maxQuerySize;

        private Builder() {
        }

        public static Builder builder() {
            return new Builder();
        }

        public Builder minId(String minId) {
            this.minId = minId;
            return this;
        }

        public Builder maxId(String maxId) {
            this.maxId = maxId;
            return this;
        }

        public Builder startTime(Date startTime) {
            this.startTime = startTime;
            return this;
        }

        public Builder endTime(Date endTime) {
            this.endTime = endTime;
            return this;
        }

        public Builder env(String env) {
            this.env = env;
            return this;
        }

        public Builder bizType(Integer bizType) {
            this.bizType = bizType;
            return this;
        }

        public Builder recordStatus(Integer recordStatus) {
            this.recordStatus = recordStatus;
            return this;
        }

        public Builder bizNo(String bizNo) {
            this.bizNo = bizNo;
            return this;
        }

        public Builder maxQuerySize(Integer maxQuerySize) {
            this.maxQuerySize = maxQuerySize;
            return this;
        }

        public RetryRecordScanQuery build() {
            RetryRecordScanQuery retryRecordScanQuery = new RetryRecordScanQuery();
            retryRecordScanQuery.endTime = this.endTime;
            retryRecordScanQuery.bizNo = this.bizNo;
            retryRecordScanQuery.maxQuerySize = this.maxQuerySize;
            retryRecordScanQuery.env = this.env;
            retryRecordScanQuery.startTime = this.startTime;
            retryRecordScanQuery.bizType = this.bizType;
            retryRecordScanQuery.recordStatus = this.recordStatus;
            retryRecordScanQuery.minId = this.minId;
            retryRecordScanQuery.maxId = this.maxId;
            return retryRecordScanQuery;
        }
    }
}
